package com.action.h5;

import com.bean.ResponseBean;
import com.pojo.Lunboimgs;
import com.pojo.Zixun;
import com.service.LunboService;
import com.service.ZixunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;
import java.util.List;

/**
 * 轮播图操作
 * @author Liao
 */
@RestController
@RequestMapping("/h5")
public class Lunboh5Action {
    @Autowired
    LunboService lunboService;

    /**
     * 查询不同页面的轮播图
     * @param type
     * @return
     */
    @RequestMapping("/lunbo")
    public ResponseBean gettu(String type){
        List list =  lunboService.gettu(type);
        if(list.size()>0){
            return new ResponseBean(200,"查询成功",list);
        }else{
            return ResponseBean.error("查询失败");
        }
    }

}
